package com.jpl.seminar.ui.module.report;

import java.util.List;

import com.jpl.seminar.model.Registration;
import com.jpl.seminar.ui.util.ServiceLocator;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;

public class ReportWindow extends Window {

	private static final long serialVersionUID = 1L;

	public ReportWindow() {
		super();

	}

	public void init() {

		setWidth("600px");
		setHeight("600px");
		Label reportLabel = new Label("Liste des inscrits");
		reportLabel.setSizeUndefined();
		addComponent(reportLabel);

		ReportTable reportTable = new ReportTable();
		reportTable.setWidth("90%");
		addComponent(reportTable);

		List<Registration> allRegistrations = ServiceLocator.getInstance().getSeminarService().getAllRegistrations();
		reportTable.setRegistrations(allRegistrations);

	}

}
